package com.qf.web;

import com.qf.service.StudentService;
import com.qf.service.impl.StudentServiceImpl;

/**
 * 2019/11/11
 * Administrator
 * spring1111
 * 面向对象面向君  不负代码不负卿
 */
public class StudentServlet {

    public StudentServlet() {
        System.out.println("servlet()");
    }
    public StudentServlet(String name,int age){
        System.out.println("servlet(name,age)="+name+","+age);
    }

    public StudentServlet(String name,String age){
        System.out.println("servlet(name,String age)="+name+","+age);
    }

    public static StudentServlet staticMethod(){
        System.out.println("staticMethod");
        return  new StudentServlet();
    }


    public void a(){
        System.out.println("servlet初始化方法");
    }

    public void b(){
        System.out.println("销毁方法");
    }
    private StudentService studentService;

    public void setStudentService(StudentService studentService) {
        System.out.println("setservice");
        this.studentService = studentService;
    }

    public void test(){
        System.out.println("servlet");
        studentService.insert();
    }

}
